/**
 * Created by Administrator on 2016/4/17.
 */

//添加邮件列表
function appendMailList(map) {
    $("#sendButton").html("发送邮件");
    $("#variableContent").empty();

    $.get('/mailm/mail/list.shtml', map, function (data) {
        $("#variableContent").append(data);
    });
}

//保存草稿
function  saveDraft(){
    var to = $("#to").val();
    var cc = $("#cc").val();
    var bcc = $("#bcc").val();
    var subject = $("#subject").val();
    var html = ue.getContent();
    var draftId = $("#driftId").val();
    var emailId = $('#email option:selected').val();

    $.post("/mailm/mail/saveDraft.shtml", {
        "to": to,
        "cc": cc,
        "bcc": bcc,
        "subject": subject,
        "content": html,
        "id":draftId,
        "emailId":emailId
    }, function () {
        $('#draftSaved').css("display","block");
        setTimeout(function(){
            $('#draftSaved').css("display","none");
        },5000)
    })



}




